import QtQuick 1.1
import com.nokia.meego 1.1
import StarMenu 1.0

Item {
    anchors.fill: parent
    x:0; y:0

    StarMenu {
        id: starMenu
        objectName: "Menu4"
        anchors.fill: parent
        smooth: true
        radiusH: main.width>>2
        radiusV: main.height>>2
        delayChangePos: 100
        starCenterVisible: true
        visualParent: main
        color: Qt.rgba(.4,.4,.4, 0.8)
        center.x: main.width>>1
        center.y: main.height>>1

        onStarMenuOpening: {textRect.text =
           "<font size=4>Inside StarItem you can put every component you like and they will be interactive.<br><br>"+
           "Here a <strong>web browwser</strong>, a <strong>ButtonRow</strong>, a <strong>button, switch"+
           "</strong> and <strong>radioButton</strong>, a <strong>particles</strong> and a <strong>video player</strong></font>";
//            textRect.z = starMenu.z;
        }


        StarItem {
            width: 250; height: 350
            scale: 0.2
            zoomHoverValue: 1
            Behavior on x { NumberAnimation { duration: 1500; easing.type: Easing.OutBounce } }
            Behavior on y { NumberAnimation { duration: 1500; easing.type: Easing.OutBounce } }
            Behavior on opacity { NumberAnimation { duration: 2200; easing.type: Easing.OutBounce } }
            Behavior on scale { NumberAnimation { duration: 500; easing.type: Easing.OutQuad } }

            Browser {
                anchors.fill: parent
                link: "http://qt-project.org/"
            }
        }

        StarItem {
            width: 320; height: 240
            scale: 0.3
            zoomHoverValue: 1
            Behavior on x { NumberAnimation { duration: 1500; easing.type: Easing.OutBounce } }
            Behavior on y { NumberAnimation { duration: 1500; easing.type: Easing.OutBounce } }
            Behavior on opacity { NumberAnimation { duration: 2200; easing.type: Easing.OutBounce } }
            Behavior on scale { NumberAnimation { duration: 500; easing.type: Easing.OutQuad } }

            Rectangle {
                color: "#000000"
                anchors.fill: parent
                Fireworks {anchors.fill: parent}
                // Without this MouseArea, on Symbian, zoomHoverValue has no effects and I don't know why
                MouseArea { anchors.fill: parent }
            }
        }

        StarItem {
            width: 320; height: 240
            scale: 0.3
            zoomHoverValue: 1
            Behavior on x { NumberAnimation { duration: 1500; easing.type: Easing.OutBounce } }
            Behavior on y { NumberAnimation { duration: 1500; easing.type: Easing.OutBounce } }
            Behavior on opacity { NumberAnimation { duration: 2200; easing.type: Easing.OutBounce } }
            Behavior on scale { NumberAnimation { duration: 500; easing.type: Easing.OutQuad } }


            Rectangle {
                color: "#aaaaaa"
                anchors.fill: parent
                // Without this MouseArea, on Symbian, zoomHoverValue has no effects and I don't know why
                MouseArea { anchors.fill: parent }
                ButtonColumn {
                    anchors.centerIn: parent
                    width: parent.width
                    Button { text: "Hello Qt"; width: parent.width }
                    Switch { }
                    Button { text: "Qt Project"; width: parent.width }
                    RadioButton { }
                }
            }
        }


    }

}

